package cn.ithers.blog.dao;

import cn.ithers.blog.pojo.Comment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

/**
 * @Author: zhanghuan
 * @date: 2020/8/31 14:50
 * @description:
 */
public interface CommentDao extends JpaRepository<Comment, String>, JpaSpecificationExecutor<Comment> {
    Comment findOneById(String commentId);

    int deleteAllByArticleId(String articleid);

    Page<Comment> findAllByArticleId(String articleId, Pageable pageable);
}
